/*
 * DealAnimationThread.java
 *
 * Copyright(c) 2010 - Kimnach
 * See main.Main.java for full copyright notice.
 *
 */

package gui.threads;

import gui.MainFrame;

/**
 * Handles dealing initiatives and showing a visual indicator that it was dealt
 * @author dkimnach
 */
public class DealAnimationThread implements Runnable {

    private MainFrame callback;
    
    /**
     * Constructor
     * @param callback
     */
    public DealAnimationThread(MainFrame callback) {
        this.callback = callback;
    }

    @Override
    public void run() {
        callback.waitCursor();

        callback.getDriver().deal();
        callback.update();
        callback.updateCounters();
        callback.updateInitLabels();
        try {
            Thread.sleep(250);
        } catch (InterruptedException ex) {
            
        } finally {
            callback.doneCursor();
        }
    }
}
